diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-03 18:46:35 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-03 18:46:35 +0900 |
| commit | 1393acc4b6675fd5eac65c6f1a9e399edfb2d44f (patch) | |
| tree | 6610385198545277ed51c4616d315aa0800c07bc /app/[lng] | |
| parent | a9c038e51f1cf508165e9d196ffe332f6ac54d74 (diff) | |
(김준회) SWP: 커버페이지 생성 API 오류 수정
Diffstat (limited to 'app/[lng]')
| -rw-r--r-- | app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx b/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx index 34ad562f..dc6fbe7c 100644 --- a/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx +++ b/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx @@ -70,34 +70,6 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP noKeyboard: true, }); - // 커버페이지 다운로드 핸들러 - const handleCoverDownload = useCallback(async (document: DocumentListItem) => { - try { - toast.info("커버 페이지를 다운로드합니다..."); - - const res = await fetch(`/api/projects/${document.PROJ_NO}/cover`, { - method: "GET" - }); - - if (!res.ok) { - const error = await res.json(); - throw new Error(error.message || "커버 페이지를 가져올 수 없습니다"); - } - - const { fileUrl, fileName } = await res.json(); - - // quickDownload 사용 - const quickDownload = (await import("@/lib/file-download")).quickDownload; - quickDownload(fileUrl, fileName || `${document.PROJ_NO}_cover.docx`); - - toast.success("커버 페이지 다운로드를 시작했습니다."); - - } catch (e) { - toast.error(e instanceof Error ? e.message : "커버 페이지 다운로드에 실패했습니다."); - console.error(e); - } - }, []); - const loadInitialData = useCallback(async () => { try { setIsLoading(true); @@ -303,7 +275,6 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP projNo={projNo} vendorCode={vendorInfo?.vendorCode || ""} userId={String(vendorInfo?.vendorId || "")} - onCoverDownload={handleCoverDownload} /> </CardContent> </Card> |
